package com.gopay.common.constants.cust;

/**
 * 认证渠道
 * @RealNameCertifyChannel.java
 * @author boai
 * @2016年12月5日 上午11:28:43  www.gopay.com.cn Inc.All rights reserved.
 */
public enum RealNameCertifyChannel {
    /**
     * 01-手持身份证
     */
    HOLD_ID("01"),

    /**
     * 02-人脸识别 
     */
    FACE_ID("02");
    
    public final String value;
    
    private RealNameCertifyChannel(String value){
        this.value = value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * 根据枚举类型的字符串值 获取 相应的枚举变量
     */
    public static RealNameCertifyChannel get(String str) {
        RealNameCertifyChannel[] realNameCertifySteps = RealNameCertifyChannel.class.getEnumConstants();
        for (RealNameCertifyChannel s : realNameCertifySteps) {
            if (s.value.equals(str)) {
                return s;
            }
        }
        throw new RuntimeException(" wrong RealNameCertifyChannel Code , string value! " + str);
    }
}
